package com.stx.day0918;

/**
 * packageName com.stx.day0918
 *
 * @author YangYi
 * @className Payment
 * @date 2025/9/18
 * @description TODO
 */
public class Payment {
    // 支付金额
    private double amount;
    // 支付订单号
    private String orderId;
    public Payment(double amount,String orderId){
        this.amount = amount;
        this.orderId = orderId;
        System.out.println("Payment 构造函数");
    }

    /**
     * 支付
     */
    void pay(){
        System.out.println("支付订单号："+orderId+"，支付金额："+amount);
    }

    /**
     * 查询支付信息
     */
    public String queryOrderInfo(double amount,String orderId){
       return  "该订单号："+orderId+"已经完成支付金额："+amount;
    }

    public double getAmount() {
        return amount;
    }

    public void setAmount(double amount) {
        this.amount = amount;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }
}
